<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>良开发 </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="良开发">
<meta http-equiv="description" content="良开发">



<link rel="stylesheet" type="text/css" href="<%=path %>/extjs/resources/css/ext-all.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/css/wiki.css">

<script language="javascript" type="text/javascript" src="<%=path %>/extjs/ext-dev.js"></script>
<script language="javascript" type="text/javascript" src="<%=path %>/extjs/src/form/field/ComboBox.js" ></script>
<script language="javascript" type="text/javascript" src="<%=path %>/extjs/src/tree/Panel.js"></script>
<script language="javascript" type="text/javascript" src="<%=path %>/extjs/src/tab/Tab.js"></script>
<script language="javascript" type="text/javascript" src="<%=path %>/extjs/src/tab/Panel.js"></script>
<script language="javascript" type="text/javascript" src="<%=path %>/extjs/src/tab/Bar.js"></script>

<script language="javascript" type="text/javascript" src="<%=path %>/javascript/common/ZeroClipboard.js"></script>

<style type="text/css">
	body { font-family:arial,sans-serif; font-size:9pt; }
		
		.my_clip_button { width:150px; text-align:center; border:1px solid black; background-color:#ccc; margin:10px; padding:10px; cursor:default; font-size:9pt; }
		.my_clip_button.hover { background-color:#eee; }
		.my_clip_button.active { background-color:#aaa; }
</style>
	<script language="JavaScript">
	var clip = null;
	
	function $(id) { return document.getElementById(id); }
	
	function init() {
		ZeroClipboard.setMoviePath( "<%=path %>/javascript/common/ZeroClipboard.swf" );  
		clip = new ZeroClipboard.Client();
		clip.setHandCursor( true );
		clip.addEventListener('load', my_load);
		clip.addEventListener('mouseOver', my_mouse_over);
		clip.addEventListener('complete', my_complete);
		clip.glue( 'd_clip_button' );
		clip.setText('123488888');
		clip.copy();
	}
	
	function my_load(client) {
		debugstr("Flash movie loaded and ready.");
	}
	
	function my_mouse_over(client) {
		// we can cheat a little here -- update the text on mouse over
		//clip.setText( $('fe_text').value );
	}
	
	function my_complete(client, text) {
		debugstr("Copied text to clipboard: " + text );
	}
	
	function debugstr(msg) {
		var p = document.createElement('p');
		p.innerHTML = msg;
		$('d_debug').appendChild(p);
	}
	
	function f2(){
		clip.copy();
	}
	</script>
</head>
<body onLoad="init()">
	<h1>Zero Clipboard Test</h1>
	<p><script>document.write("Your browser: " + navigator.userAgent);</script></p>
	<table width="100%">
		<tr>
			<td width="50%" valign="top">
				<!-- Upload Form -->
				<table>
					<tr>
						<td align="right"><b>Text:</b></td>
						<td align="left"><textarea id="fe_text" cols=50 rows=5 onChange="clip.setText(this.value)">Copy me!</textarea></td>
					</tr>
				</table>
				<br/>
				<div id="d_clip_button" class="my_clip_button"><b>Copy To Clipboard...</b></div>
			</td>
			<td width="50%" valign="top">
				<!-- Debug Console -->
				<div id="d_debug" style="border:1px solid #aaa; padding: 10px; font-size:9pt;">
					<h3>Debug Console:</h3>
				</div>
			</td>
		</tr>
	</table>
	
	<br/><br/>
	You can paste text here if you want, to make sure it worked:<br/>
	<textarea id="testarea" cols=50 rows=10></textarea><br/>
	<input type=button value="Clear Test Area" onClick="$('testarea').value = '';"/>
	<input type=button value="Click" onClick="f2();"/>
	
</body>
</html>
